/*
 * Servo.h
 *
 * Created: 3/21/2013 6:51:01 AM
 *  Author: Parag
 */ 


#ifndef SERVO_H_
#define SERVO_H_

#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>

#define P_Rudder			PB6			// Rudder: 16 bit Timer 1 // PB6 or OC1B

enum Angles{
	// refer to http://en.wikipedia.org/wiki/Cardinal_direction
	//it goes from 90 - 310 with 160 degrees rotation
	North,	//160 degrees
	NW,		//120 degrees
	WNW,	//100
	West,	//80 degrees
	WSW,	//60
	SW,		//40 degrees
	South	//0 degrees
};

void ConfigRudderServo(enum Angles ang);
void ServoInit();


#endif /* SERVO_H_ */